package cpoo.exceptions;

public class MotionException extends Exception {
	public static final long serialVersionUID = 2;
	private Exception cause;
	private String info;
	public MotionException (Exception cause, String info){
		this.cause = cause;
		this.info = info;
	}
	
	public String toString (){
		if (cause != null){
			return "Motion Exception: caused by "+cause.toString();
		}
		return "Motion Exception:";
	}
	
	public void printInfo(){
		System.out.println(info);
	}
	
	public String getInfo(){
		return info;
	}
}
